import { useGetCurrentUser } from "@/entities/user/model/useGetCurrentUser";
import { UiButton } from "@/shared/Uikit";
import useLogout from "../model/useLogout";
import { HTMLAttributes } from "react";
import { FaArrowRightToBracket } from "react-icons/fa6";

type LogoutButtonProps = {

} & HTMLAttributes<HTMLButtonElement>

export default function LogoutButton(props: LogoutButtonProps) {
    const { logout } = useLogout();
    return (
        <>
            <button {...props} onClick={() => logout()}>
                <FaArrowRightToBracket className="size-5 mr-2" />
                <span>Выйти</span>
            </button>
        </>
    )
}